package com.cloud.netflixdemo.consumer.remote;

import feign.hystrix.FallbackFactory;
import org.springframework.stereotype.Component;

@Component
public class HelloRemoteFallbackFactory implements FallbackFactory<HelloRemote> {

    @Override
    public HelloRemote create(Throwable throwable) {
        return new HelloRemote() {
            @Override
            public String hello(String name) {
                return "error hello " + name + ", this messge send failed ";
            }
        };
    }
}
